Integrating menu in Web pages

 
 


INTEGRATING MENU IN WEB PAGES

To use a menu in your web pages you must take the following four steps:

Step 1. Generate the menu

Web Menu Builder features an integrated page generator that can create a sample HTML page for you so you can try your menus and integrate them in your web site.You can generate your menu at any time by just selecting the Run menu and then clicking on the Generate option or by clicking on the Generate icon on the toolbar.

When generating a menu, the following elements are created:

HTML output file

This is the sample HTML page that contains the menu link (implements your menu).

Java Script Menu Definition

This is the Java Script Menu Definition file.

Java Script Menu File

This is the Java Script Menu file.

pixel.gif path

This is the path to the pixel.gif file, must not end with /.

Web Menu Builder features an integrated page generator that can create a sample HTML page for you so you can try your menus and integrate them in your web site.You can generate your menu at any time by just selecting the Run menu and then clicking on the Generate option [1] or by clicking on the Generate icon [2] on the toolbar.

The result is compiled JavaScript files and the HTML output file that implements your menu.

   
 

You can generate your menu

 
 

 


Step 2. Link the generated menu to your web pages

At this stage, you need to insert the necessary menu link into the selected web pages. No DHTML or Javascript knowledge is required since the most work is already done by the Web Menu Builder. The menu link is a few lines code and can be easily recognized in the source code of the page.

The linking process requires only two pieces of information:

The generated menu files

The web page(s) where the menu link will be created.

You have to copy lines beginning with <!-- START INCLUDE YOU MENU SPECIFICATION --> and ending with <!-- END INCLUDE YOU MENU SPECIFICATION --> from generated HTML page. Then you have simply to paste them in your page code.

Note: The link can be inserted in any kind of page, regardless of its extension.


Step 3. Upload the necessary menu files

Let's say that the local root folder of your site is the c:\mysite folder and that the contents of your web site are:

c:\site\index.html
c:\site\info.html
...
c:\site\faq.html

You now design a menu, called wmb_menu.wmb, and you generate it into files called c:\site\wmb_menu.js and c:\site\wmb_def.js and c:\site\pixel.gif.

Your local web site now contains:

c:\site\index.html
c:\site\info.html
...
c:\site\faq.html
c:\site\wmb_menu.js
c:\site\wmb_def.js
c:\site\pixel.gif

The files in bold should be uploaded on the server in the same directory structure where they are locally created.

If you don't upload them or you misplace them on the server the menu will fail to appear due to the following reasons:

misplacement of the wmb_menu.js file: all web pages linked to the generated menu will not be able to find it.

misplacement of the wmb_def.js file: the wmb_menu.js file will not be able to call the necessary wmb_def.js definition file.

Note: You can generate the menu anywhere you like within your site's directory structure. This decision should not be affected by the location of the pages you want to link the menu to.

In general, simply generate your menu into your root directory or into a manually-created subdirectory and you will be able to link it to any page, shared border, template or library of that web site directory structure you want.


Step 4. Upload the web pages that contain the menu link

The previous steps are needed for the creation of a new menu which is not linked to your web pages. Not all steps are needed for the following common objectives:

Menu is already generated and uploaded (The Objective is to update the menu, apply a different appearance or add new items).

Steps needed: 1 & 2
Steps not needed: 3 & 4 (because the pages already contain the link and are uploaded)

Web pages are already linked to the generated menu and uploaded (The Objective is to add the menu link to additional web pages).

Steps needed: 3 & 4 (to the new pages only)
Steps not needed: 1 & 2 (because the menu remains the same)